package activities;

import utils.BitmapLoader;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.webkit.WebView;
import android.widget.ImageView;

import com.mga.wheelcommunity.R;

public class PhotoActivity extends Activity {
	ImageView bigPhoto;
	WebView webViewPhoto;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.photo);
		
		bigPhoto = (ImageView)findViewById(R.id.imageViewBigPhoto);
		bigPhoto.setOnTouchListener(new OnTouchListener() {
			
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				// TODO Auto-generated method stub
				return false;
			}
		});
		String photo_url = getIntent().getStringExtra("photo_max_orig");
		
		BitmapLoader loadBitmap = new BitmapLoader(bigPhoto);
		loadBitmap.execute(photo_url);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.photo, menu);
		return true;
	}

}
